define(function(require,exports,module){
    require("jquery");
    mui('.mui-bar-tab').on('tap','a',function(){
        location.href = this.getAttribute('href');
    })
    // 下移
    $(document).on("tap",".down",function(){
        if($(this).parents(".mui-table-view-cell").next()){
            $(this).parents(".mui-table-view-cell").next().after($(this).parents(".mui-table-view-cell"));
        }else{

        }
    })
    // 上移
    $(document).on("tap",".up",function(){
        if($(this).parents(".mui-table-view-cell").prev()){
            $(this).parents(".mui-table-view-cell").prev().before($(this).parents(".mui-table-view-cell"));
        }else{

        }
    })

    require("layer");
    //删除
    $(document).on("click",".delete",function(){
        var $this = $(this).parents(".mui-table-view-cell");
        layer.open({
            title:false,
            content:"确认删除此图片？",
            btn:['确定','取消'],
            yes:function(index){
                $this.remove();
                layer.close(index);
            }
        })
    })
})
